<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>瀑布流分页</title>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$("#next").click(function(){
		var num = $("#num").val();
		var id = $("#id").val();
		$.post(
			'pubu_ajax.php?action=next',
			{num:num,id:id},
			function(data){
				$("#next").before(data);
				$("#id").val(id-num);
			}
		)
	})
})
</script>
</head>
<body>
<{foreach item=pubu from=$pubu}>
<p><{$pubu.content}></p>
<{/foreach}>

<input type="button" id="next" value="+"/>
<input type="text" id="id" value="<{$pubu.id}>"/>
<input type="text" id="num" value="10"/>
</body>
</html>